You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > PoissonFit Method > Statistics.PoissonFit Method ([In] TVec, out double, double[], double)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.PoissonFit Method ([In] TVec, out double, double[], double)

Calculate parameters for Poisson distributed values.

Syntax
C#
Visual Basic
public static void PoissonFit([In] TVec X, out double lambda, ref double[] lambdaConfInt, double Alpha);
Parameters 
Description 
[In] TVec X 
Stores data which is assumed to be Poisson distributed. 
out double lambda 
Returns Poisson distribution parameter estimator. 
ref double[] lambdaConfInt 
Lambda (1-Alpha)*100 percent confidence interval. 
double Alpha 
Confidence interval percentage. 

RandomPoisson, PoissonStat

The following example generates 500 random Poisson distributed values and then uses PoissonFit routine to extract used Lambda parameter

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector vec1 = new Vector(500,false); // first, generate 500 randomly Poiss. distributed // numbers with parameter lambda=1.17 StatRandom.RandomPoisson(1.17,vec1,-1); // Now, extract the lambda and its 95% // confidence interval double resLambda; double[] CILambda = new double[2]; Statistics.PoissonFit(vec1,out resLambda,out CILambda,0.05); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!